package main.java.main;

import com.alibaba.fastjson.JSON;
import main.java.main.bean.AutoBean;
import main.java.main.bean.CoverageBean;
import main.java.main.util.CreateUtil;
import main.java.main.util.DateUtil;
import main.java.main.util.ReadCsvFile;

import java.io.IOException;
import java.util.ArrayList;

/**
 * Coverage 测试生成
 *
 * @author yangsheng
 *
 */
public class CoverageTest01 {


    public static void main(String[] args) throws IOException {

        try {
            //1.配置对象

            String readConfig = System.getProperty("user.dir") + "/V6NewTools/conf/coverage/config.json";

            String jsonStr = CreateUtil.readJsonFile(readConfig);
            CoverageBean bean = JSON.parseObject(jsonStr, CoverageBean.class);
            if(bean!=null){
                bean.setDayTime(DateUtil.currentDate());
                //读取目录
                String readPath = "";
                //读取模板
                //2.生成代码
                CreateUtil.createSrvCoverageCode(bean);
//                CreateUtil.createWebCoverageCode(bean);
            }

        } catch (Exception e) {
            e.printStackTrace();
        }
    }


}